﻿<UserControl x:Class="Dsl.Ped.Desktop.Views.AboutView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Border Grid.Column="0" Grid.Row="0" BorderThickness="1" BorderBrush="Black" Margin="-1,-1,-1,0">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="White" Offset="0.5" />
                    <GradientStop Color="White" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <Image  Width="100" 
                    Source="pack://application:,,,/DSLPedDesktop;component/Resources/Images/dslped_icon.ico"
                    HorizontalAlignment="Left"
                    Margin="5,5,5,5"/>
        </Border>

        <StackPanel Grid.Row="1" Orientation="Vertical">
            <Label Padding="10,5,0,0">DSLPed Desktop Application</Label>
            <Label Padding="10,0,0,0" Content="{Binding Path=VersionString}"/>
            <Label Padding="10,0,0,0">© 2013 Ondrej Dvorak</Label>
            <Label Padding="10,0,0,0">All rights reserved</Label>
        </StackPanel>

        <StackPanel Grid.Row="2">
            <Label Padding="10,5,0,0">Loaded add-ins:</Label>
            <ListBox Margin="10,5,10,5" Height="100" ItemsSource="{Binding Path=AddIns}"
                        SelectedItem="{Binding Path=SelectedAddIn}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Label Padding="2,0,0,0" Content="{Binding Name}"/>
                            <Label Margin="5,0,0,0" Padding="2,0,0,0" Content="{Binding Version}" Foreground="Gray" FontStyle="Italic"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </StackPanel>

        <StackPanel Grid.Row="3">
            <Label Padding="10,5,0,0">Detail:</Label>
            <Border Margin="10,5,10,5" BorderThickness="1" BorderBrush="Black">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border Grid.Column="0">
                        <Image Source="{Binding Path=Image, Mode=OneWay}" Width="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,10,10,10"/>
                    </Border>
                    <TextBox Grid.Column="1" Height="80" Margin="0,0,0,1" Text="{Binding Path=Detail, Mode=OneWay}" IsReadOnly="True" TextWrapping="Wrap"/>
                </Grid>
            </Border>
        </StackPanel>

    </Grid>
</UserControl>
